package org.kiwi.data;

import org.kiwi.data.vo.TableShardingParameter;

/**
 * Created by jack on 16/12/17.
 */
public class TableShardingStrategyHolder {

    private static final ThreadLocal<TableShardingParameter> TABLE_SHARDING_PARAMETER = new ThreadLocal<>();

    public static TableShardingParameter getTableShardingParameter() {
        return TABLE_SHARDING_PARAMETER.get();
    }

    public static void setTableShardingParameter(TableShardingParameter tableShardingParameter) {
        TABLE_SHARDING_PARAMETER.set(tableShardingParameter);
    }

    public static void clear() {
        TABLE_SHARDING_PARAMETER.remove();
    }
}
